home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / text / faqs / linux.faq.part2 < prev    next >
Encoding:
Internet Message Format  |  1994-04-12  |  42.3 KB

  1. Subject: Linux Frequently Asked Questions with Answers (FAQ: 2/2)
  2. Newsgroups: comp.os.linux.announce,comp.os.linux.help,comp.answers,news.answers
  3. From: ijackson@nyx.cs.du.edu (Ian Jackson)
  4. Date: Sun, 10 Apr 1994 12:05:36 GMT
  5.  
  6. Archive-Name: linux/faq/part2
  7. Last-Modified: 10 Apr 1994
  8.  
  9. (Continued from part 1, where you'll find the introduction and
  10.  table of contents.)
  11. ===============================================================================
  12.  
  13. Section 6.  Miscellaneous questions and problems
  14.  
  15.  Q6.1        How do I make my executables smaller ?
  16.  Q6.2        How many people use Linux ?
  17.  Q6.3        How can I get scrollback on text VC's ?
  18.  Q6.4        Setuid scripts don't seem to work.
  19.  Q6.5        Free memory as reported by free keeps shrinking.
  20.  Q6.6        What is a BogoMip ?
  21.  Q6.7        How do I set the timezone ?
  22.  Q6.8        What version of Linux and what machine name am I using ?
  23.  Q6.9        When I add more memory it slows to a crawl.
  24.  Q6.10       Some programs (e.g. xdm) won't let me log in.
  25.  Q6.11       Some programs let me log in with no password.
  26.  Q6.12       My machine runs very slowly when I run GCC / X / ...
  27.  Q6.13       I can only log in as root.
  28.  Q6.14       How can I produce core files ?
  29.  Q6.15       How do I stop producing core files ?
  30.  Q6.16       My keyboard goes all funny after I switch VC's.
  31.  Q6.17       My screen is all full of weird characters instead of letters.
  32.  Q6.18       What is a .gz file ? And a .tgz ? And ... ?
  33.  Q6.19       I have screwed up my system and can't log in to fix it.
  34.  Q6.20       How do I upgrade/recompile my kernel ?
  35.  Q6.21       Can I have more than 3 serial ports by sharing interrupts ?
  36.  Q6.22       Emacs just dumps core.
  37.  Q6.23       How do I make a bootable floppy ?
  38.  Q6.24       How do I remap my keyboard to UK, French, etc. ?
  39.  Q6.25       I've discovered a huge security hole in rm !
  40.  Q6.26       lpr and lpd aren't working.
  41.  Q6.27       How do I make a shared library ?
  42.  Q6.28       What does VFS stand for ?
  43.  
  44. -------------------------------------------------------------------------------
  45.  
  46. Question 6.1.  How do I make my executables smaller ?
  47.  
  48. The most common cause of large executables is the -g compiler flag.  This
  49. causes (as well as debugging information in the output file) the resulting
  50. program to be linked statically, i.e. by including a copy of the C library
  51. in it instead of using a dynamically linked copy.
  52.  
  53. Other things that are worth investigating are -O and -O2 which enable
  54. optimisation (check the GCC documentation), -s which strips the symbol
  55. information from the resulting binary (making debugging totally
  56. impossible).
  57.  
  58. On very small executables you may wish to use -N, but you shouldn't do
  59. this unless you understand its performance implications.
  60.  
  61. -------------------------------------------------------------------------------
  62.  
  63. Question 6.2.  How many people use Linux ?
  64.  
  65. Linux is freely available, and no one is required to register their copies
  66. with any central authority, so it is difficult to know.  Several
  67. businesses are now surviving solely on selling and supporting Linux, and
  68. very few Linux users use those businesses, relatively speaking.  The Linux
  69. newsgroups are some of the most heavily read on the Net, so the number is
  70. likely in the hundreds of thousands, but firm numbers are hard to come by.
  71.  
  72. However, one brave soul, Harald T. Alvestrand
  73. <Harald.T.Alvestrand@uninett.no>, has decided to try, and asks that if you
  74. use Linux, you send a message to linux-counter@uninett.no with one of the
  75. following subjects: `I use Linux at home', `I use Linux at work', or `I
  76. use Linux at home and at work'.  He will also accept `third-party'
  77. registrations - ask him for details.  He posts his counts to
  78. comp.os.linux.misc.
  79.  
  80. -------------------------------------------------------------------------------
  81.  
  82. Question 6.3.  How can I get scrollback on text VC's ?
  83.  
  84. With the default US keymap you can use Shift with the PageUp and PageDown
  85. keys (NB these must be the grey ones, not the ones that are on the numeric
  86. keypad !).  With other keymaps check the maps in /usr/lib/keytables; you
  87. can remap the scroll up and down keys to be whatever you like --- for
  88. example, in order to remap them to keys that exist on an 84-key AT
  89. keyboard.
  90.  
  91. You can't increase the amount of scrollback, because of the way it is
  92. implemented using the video memory to store the scrollback text, though
  93. you may be able to get more scrollback in each VC by reducing the total
  94. number of VC's --- see <linux/tty.h>.
  95.  
  96. -------------------------------------------------------------------------------
  97.  
  98. Question 6.4.  Setuid scripts don't seem to work.
  99.  
  100. That's right.  This feature has been specifically disabled in the Linux
  101. kernel because setuid scripts are almost always a security hole.  If you
  102. want to know why read the FAQ for comp.unix.questions.
  103.  
  104. -------------------------------------------------------------------------------
  105.  
  106. Question 6.5.  Free memory as reported by free keeps shrinking.
  107.  
  108. The `free' figure printed by free doesn't include memory used as a disk
  109. buffer cache - shown in the `buffers' column.  If you want to know how
  110. much memory is really free add the `buffers' amount to `free'.
  111.  
  112. The disk buffer cache tends to grow soon after starting Linux up, as you
  113. load more programs and use more files and the contents get cached.  It
  114. will stabilise after a while.
  115.  
  116. -------------------------------------------------------------------------------
  117.  
  118. Question 6.6.  What is a BogoMip ?
  119.  
  120. `BogoMips' is a contraction of `Bogus MIPS'.  MIPS stands for (depending
  121. who you listen to) Millions of Instructions per Second, or Meaningless
  122. Indication of Processor Speed.
  123.  
  124. The number printed at boot-time is the result of a kernel timing
  125. calibration, used for very short delay loops by some device drivers.
  126.  
  127. As a very approximate guide the BogoMips will be approximately:
  128.           386SX               clock * 0.125 + 0.2
  129.           386DX               clock * 0.20 - 0.6
  130.           486SX/DX            clock * 0.49 + 0.25
  131.           486DX2              clock * 0.50 + 0.37
  132.           Pentium             24.0
  133.  
  134. If the number you're seeing is wildly lower than this you may have the
  135. Turbo button or CPU speed set incorrectly, or have some kind of caching
  136. problem [as described in Q6.9 `When I add more memory it slows to a
  137. crawl.'.]
  138.  
  139. For values people have seen with other, rarer, chips, see the Bogomips
  140. Information Sheet, published by Wim van Dorst <baron@clifton.hobby.nl> in
  141. comp.os.linux.announce.
  142.  
  143. -------------------------------------------------------------------------------
  144.  
  145. Question 6.7.  How do I set the timezone ?
  146.  
  147. Change directory to /usr/lib/zoneinfo; get the timezone package if you
  148. don't have this directory.  The source can be found on sunsite.unc.edu in
  149. /pub/Linux/system/Admin/timesrc-1.2.tar.gz.
  150.  
  151. Then make a symbolic link named localtime pointing to one of the files in
  152. this directory (or a subdirectory), and one called posixrules pointing to
  153. localtime.  For example:
  154.    ln -sf US/Mountain localtime
  155.    ln -sf localtime posixrules
  156. This change will take effect immediately - try date.
  157.  
  158. Don't try to use the TZ variable - leave it unset.
  159.  
  160. If you have a system which complies with a very recent version of the
  161. Linux Filesystem Standard you will find that /usr/lib/zoneinfo/localtime
  162. is a symbolic link to /etc/localtime.  In this case, simply copy the
  163. appropriate file from /usr/lib/zoneinfo to /etc/localtime and leave the
  164. link alone.  For example:
  165.    cp /usr/lib/zoneinfo/US/Mountain /etc/localtime
  166.  
  167. -------------------------------------------------------------------------------
  168.  
  169. Question 6.8.  What version of Linux and what machine name am I using ?
  170.  
  171. Type:
  172.    uname -a
  173.  
  174. -------------------------------------------------------------------------------
  175.  
  176. Question 6.9.  When I add more memory it slows to a crawl.
  177.  
  178. This is quite a common symptom of a failure to cache the additional
  179. memory.  The exact problem depends on your motherboard.
  180.  
  181. Sometimes you have to enable caching of certain regions in your BIOS
  182. setup.  Look in the CMOS setup and see if there is an option to cache the
  183. new memory area which is currently switched off.  This is apparently most
  184. common on a 486.
  185.  
  186. Sometimes the RAMs have to be in certain sockets to be cached.
  187.  
  188. Sometimes you have to set jumpers to enable the caching.
  189.  
  190. Some motherboards don't cache all the RAM if you have more RAM per amount
  191. of cache than they expect.  Usually a full 256K cache will solve this
  192. problem.
  193.  
  194. If in doubt, check your motherboard manual.  If you still can't fix it
  195. because the documentation is inadequate you might like to post a message
  196. giving *all* the details - make, model number, date code, etc. so that
  197. other Linux users can avoid it.
  198.  
  199. -------------------------------------------------------------------------------
  200.  
  201. Question 6.10.  Some programs (e.g. xdm) won't let me log in.
  202.  
  203. You are probably using non-shadow-password programs but are using shadow
  204. passwords.
  205.  
  206. If so, you have to get or compile a shadow password version of the
  207. program(s) in question.  The shadow password suite can be found in
  208. (amongst other places):
  209.    tsx-11.mit.edu:/pub/linux/sources/usr.bin/shadow-*
  210. This is the source code; you will probably find the binaries in
  211. .../linux/binaries/usr.bin.
  212.  
  213. -------------------------------------------------------------------------------
  214.  
  215. Question 6.11.  Some programs let me log in with no password.
  216.  
  217. You probably have the same problem as in Q6.10 `Some programs (e.g. xdm)
  218. won't let me log in.', with an added wrinkle:
  219.  
  220. If you are using shadow passords you should put an asterisk in the
  221. password field of /etc/passwd for each account, so that if a program
  222. doesn't know about the shadow passwords it won't think it's a passwordless
  223. account and let anyone in.
  224.  
  225. -------------------------------------------------------------------------------
  226.  
  227. Question 6.12.  My machine runs very slowly when I run GCC / X / ...
  228.  
  229. You probably don't have any swap enabled.  You need to enable swapping to
  230. allow Linux to page out bits of data programs aren't using at the moment
  231. to disk to make more room for other programs and data.  If you don't Linux
  232. has to keep data in memory and throw away in-memory copies of programs
  233. (which are paged straight from the filesystem) and so less and less
  234. program is in memory and everything runs very slowly.
  235.  
  236. See the Installation HOWTO and the Installation and Getting Started Guide
  237. [Q2.1 `Where can I get the HOWTOs and other documentation ?'] for details
  238. of how to set up a swap partition or swapfile; see also Q4.5 `My swap area
  239. isn't working.'.
  240.  
  241. Alternatively you may have too little real memory.  If you have less RAM
  242. than all the programs you're running at once use Linux will use your hard
  243. disk instead and thrash horribly.  The solution in this case is to not run
  244. so many things at once or to buy more memory.  You can also reclaim some
  245. memory by compiling and using a kernel with less options configured.  See
  246. Q6.20 `How do I upgrade/recompile my kernel ?'.
  247.  
  248. You can tell how much memory and/or swap you're using by using the free
  249. command, or by typing
  250.     cat /proc/meminfo
  251.  
  252. -------------------------------------------------------------------------------
  253.  
  254. Question 6.13.  I can only log in as root.
  255.  
  256. You probably have some permission problems, or you have a file
  257. /etc/nologin.
  258.  
  259. If the latter put rm -f /etc/nologin in your /etc/rc or /etc/rc.local.
  260.  
  261. Otherwise check the permissions on your shell, and any filenames which
  262. appear in error messages, and also the directories containing these files
  263. all the way back up the tree to the root directory.
  264.  
  265. -------------------------------------------------------------------------------
  266.  
  267. Question 6.14.  How can I produce core files ?
  268.  
  269. Since 0.99pl14 Linux has had corefiles turned off by default for all
  270. processes.  You can turn them on by using the ulimit command in bash, or
  271. the limit command in tcsh.  See the manpages or Q6.15 `How do I stop
  272. producing core files ?' for more details.
  273.  
  274. After executing that command all programs run from that shell (directly or
  275. indirectly) will be able to dump core.
  276.  
  277. If you wish to enable coredumping for all processes by default you can
  278. change the default setting in <linux/sched.h> - see the definition of
  279. INIT_TASK.
  280.  
  281. -------------------------------------------------------------------------------
  282.  
  283. Question 6.15.  How do I stop producing core files ?
  284.  
  285. If you use bash put
  286.    ulimit -c 0
  287. in your .shrc or .bashrc; if you use tcsh put
  288.    limit coredumpsize 0
  289. in your .cshrc.  For other shells check the shell's manpage.
  290.  
  291. This state of affairs is the default with newer kernels.
  292.  
  293. -------------------------------------------------------------------------------
  294.  
  295. Question 6.16.  My keyboard goes all funny after I switch VC's.
  296.  
  297. This is a bug in kernel versions before 0.99pl14-alpha-n.  Sometimes Linux
  298. loses track of what modifier keys (Shift, Alt, Control etc.) are pressed
  299. or not, and believes that one or more are pressed when they are not.  The
  300. solution is to press and release each of the modifier keys (without
  301. pressing any other keys) --- this will ensure that Linux knows what state
  302. the keyboard is actually in.
  303.  
  304. This problem often occurs when switching out of X windows; it can
  305. sometimes be avoided by releasing Ctrl and Alt very quickly after pressing
  306. the F-key of the VC you are switching to.
  307.  
  308. -------------------------------------------------------------------------------
  309.  
  310. Question 6.17.  My screen is all full of weird characters instead of letters.
  311.  
  312. You probably sent some binary data to your screen by mistake.  Type echo
  313. "^V^[c" (that's E C H O space control-V escape C return) to fix it.
  314.  
  315. -------------------------------------------------------------------------------
  316.  
  317. Question 6.18.  What is a .gz file ? And a .tgz ? And ... ?
  318.  
  319. .gz (and .z) files have been compressed using GNU gzip.  You have to get a
  320. copy of gunzip (included in the gzip distribution and with most Linux
  321. installations) to unpack the file.
  322.  
  323. .taz and .tz are tarfiles (made with Unix tar) compressed using standard
  324. Unix compress.
  325.  
  326. .tgz (or .tpz) is a tarfile compressed with gzip.
  327.  
  328. The file command can often tell you what a file is.
  329.  
  330. If you find that gzip complains when you try to uncompress a gzipped file
  331. you probably downloaded it in ASCII mode by mistake.  You must download
  332. most things in binary mode - remember to type binary as a command in FTP
  333. before using get to get the file.
  334.  
  335. -------------------------------------------------------------------------------
  336.  
  337. Question 6.19.  I have screwed up my system and can't log in to fix it.
  338.  
  339. Reboot from an emergency floppy, for example the Slackware a1 disk or the
  340. MCC installation boot floppy.  Get to a shell prompt and mount your hard
  341. disk with something like
  342.    mount -t ext2 /dev/hda1 /mnt
  343.  
  344. Then your filesystem is available under the directory /mnt and you can fix
  345. the problem.  Remember to unmount your hard disk before rebooting (cd back
  346. down to / first or it will say it's busy).
  347.  
  348. -------------------------------------------------------------------------------
  349.  
  350. Question 6.20.  How do I upgrade/recompile my kernel ?
  351.  
  352. See the README which comes with the kernel release, in
  353.         ftp.funet.fi:/pub/OS/Linux/PEOPLE/Linus
  354. and mirrors thereof.  Try to get it from a closer site if possible;
  355. ftp.funet.fi is a very busy site and therefore slow -- see Q2.3 `How do I
  356. install Linux ?'.  You may already have a version of the kernel source
  357. code installed on your system, but if you got it as part of a standard
  358. distribution it is likely to be somewhat out of date (this is not a
  359. problem if you only want a custom-configured kernel, but it probably is if
  360. you need to upgrade.)
  361.  
  362. Remember that to make the new kernel boot you must run LILO after copying
  363. the kernel into your root partition -- the Makefile in recent kernels has
  364. a special zlilo target for this; try make zlilo.
  365.  
  366. -------------------------------------------------------------------------------
  367.  
  368. Question 6.21.  Can I have more than 3 serial ports by sharing interrupts ?
  369.  
  370. Not without some trickery.  This is a limitation of the ISA bus
  371. architecture.
  372.  
  373. See the Serial HOWTO for information about how to work around this
  374. problem.
  375.  
  376. -------------------------------------------------------------------------------
  377.  
  378. Question 6.22.  Emacs just dumps core.
  379.  
  380. You probably have the X version of Emacs that comes with SLS.  It doesn't
  381. work without the X libraries.  The solution is to install X Windows or get
  382. a newer Emacs binary without any X Windows support.
  383.  
  384. -------------------------------------------------------------------------------
  385.  
  386. Question 6.23.  How do I make a bootable floppy ?
  387.  
  388. Make a filesystem on it with bin, etc and lib directories -- everything
  389. you need.  Install a kernel on it and arrange to have LILO boot it from
  390. the floppy (see the LILO documentation, in lilo.u.*.ps).
  391.  
  392. If you build the kernel (or tell LILO to tell the kernel) to have a
  393. ramdisk the same size as the floppy the ramdisk will be loaded at
  394. boot-time and mounted as root in place of the floppy.
  395.  
  396. -------------------------------------------------------------------------------
  397.  
  398. Question 6.24.  How do I remap my keyboard to UK, French, etc. ?
  399.  
  400. For recent kernels, get kbd*.tar.gz from the same place as you got the
  401. kernel source.  Make sure you get the appropriate version; you have to use
  402. the right keyboard-mapping package to go with your kernel version.  The
  403. latest at the time of writing is kbd-0.85.tar.gz, which works with at
  404. kernel versions from 1.0.
  405.  
  406. For older kernels you have to edit the top-level kernel Makefile, in
  407. /usr/src/linux.
  408.  
  409. You may find more helpful information in the Keyboard FAQ, on ftp.funet.fi
  410. in /pub/OS/Linux/doc/kbd.FAQ.
  411.  
  412. -------------------------------------------------------------------------------
  413.  
  414. Question 6.25.  I've discovered a huge security hole in rm !
  415.  
  416. No you haven't.  You are obviously new to Unix and need to read a good
  417. book on it to find out how things work.  Clue: ability to delete files
  418. under Unix depends on permission to write the directory they are in.
  419.  
  420. -------------------------------------------------------------------------------
  421.  
  422. Question 6.26.  lpr and lpd aren't working.
  423.  
  424. Check the Printing HOWTO [Q2.1 `Where can I get the HOWTOs and other
  425. documentation ?'].
  426.  
  427. -------------------------------------------------------------------------------
  428.  
  429. Question 6.27.  How do I make a shared library ?
  430.  
  431. Get tools-2.11.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC.
  432. Read the documentation enclosed with these tools for instructions.
  433.  
  434. -------------------------------------------------------------------------------
  435.  
  436. Question 6.28.  What does VFS stand for ?
  437.  
  438. Virtual File System.  It's the abstraction layer between the user and real
  439. filesystems like ext2, minix and msdos.  Amongst other things, its job is
  440. to flush the read buffer when it detects a disk change on the floppy disk
  441. drive:
  442.    VFS: Disk change detected on device 2/0
  443.  
  444. This would seem like an appropriate entry for a glossary - Matt, are there
  445. any plans to produce such a thing ?
  446.  
  447. ===============================================================================
  448.  
  449. Section 7.  Frequently Encountered Error messages
  450.  
  451.  Q7.1        fdisk says Partition X has different phsyical/logical ...
  452.  Q7.2        fdisk: Partition 1 does not start on cylinder boundary
  453.  Q7.3        lp1 on fire
  454.  Q7.4        INET: Warning: old style ioctl(IP_SET_DEV) called!
  455.  Q7.5        ld: unrecognized option '-m486'
  456.  Q7.6        GCC says Internal compiler error
  457.  Q7.7        make says Error 139
  458.  Q7.8        df says Cannot read table of mounted filesystems
  459.  Q7.9        shell-init: permission denied when I log in.
  460.  Q7.10       No utmp entry.  You must exec ... when I log in.
  461.  Q7.11       EXT2-fs: warning: mounting unchecked filesystem
  462.  Q7.12       EXT2-fs warning: maximal count reached
  463.  Q7.13       EXT2-fs warning: checktime reached
  464.  Q7.14       fdisk says cannot use nnn sectors of this partition
  465.  Q7.15       fdisk says partition n has an odd number of sectors
  466.  Q7.16       mtools says cannot initialise drive XYZ
  467.  Q7.17       My AHA1542C doesn't work with Linux.
  468.  
  469. -------------------------------------------------------------------------------
  470.  
  471. Question 7.1.  fdisk says Partition X has different phsyical/logical ...
  472.  
  473. If the partition number (X, above) is 1 this is the same problem as Q7.2
  474. `fdisk: Partition 1 does not start on cylinder boundary'.
  475.  
  476. If the partition begins or ends on a cylinder numbered beyond 1024, this
  477. is because standard DOS disk geometry information format in the partition
  478. table can't cope with cylinder numbers with more than 10 bits.
  479.  
  480. This will cause DOS to be unable to access the partition correctly, and
  481. will make booting a Linux kernel from that partition using LILO
  482. problematic at best.
  483.  
  484. You can still use the partition for Linux or other operating systems that
  485. use linear addressing (ie, number the disk blocks sequentially without
  486. looking at heads, tracks and sectors).
  487.  
  488. I'd recommend creating at least one Linux partition entirely under the
  489. 1024-cylinder limit and booting off that; the other partitions will then
  490. be OK.
  491.  
  492. -------------------------------------------------------------------------------
  493.  
  494. Question 7.2.  fdisk: Partition 1 does not start on cylinder boundary
  495.  
  496. The version of fdisk that comes with many Linux systems creates partitions
  497. that fail its own validity checking.  Unfortunately if you've already
  498. installed your system there's not much you can do about this, apart from
  499. copying the data off the partition, deleting and remaking it, and copying
  500. the data back.
  501.  
  502. If you are creating a new partition 1 that starts in the first cylinder,
  503. you can do the following to get a partition that fdisk likes.
  504.  
  505. 1. Create partition 1 in the normal way.  A p listing will produce the
  506. mismatch complaint.
  507.  
  508. 2. Type u to set sector mode and do p again.  Copy down the number from
  509. the "End" column.
  510.  
  511. 3. Delete partition 1.
  512.  
  513. 4. While still in sector mode recreate partition 1.  Set the first sector
  514. to match the number of sectors per track.  This is the sector number in
  515. the first line of the p output.  Set the last sector to the value noted in
  516. 2. above.
  517.  
  518. 5. Type u to reset cylinder mode and continue with other partitions.
  519.  
  520. -------------------------------------------------------------------------------
  521.  
  522. Question 7.3.  lp1 on fire
  523.  
  524. This is a joke/traditional error message indicating that some sort of
  525. error is being reported by your printer, but it isn't offline or out of
  526. paper.  It may be that you have some kind of I/O or IRQ conflict - check
  527. your cards' settings.  Hopefully it isn't really on fire ...
  528.  
  529. -------------------------------------------------------------------------------
  530.  
  531. Question 7.4.  INET: Warning: old style ioctl(IP_SET_DEV) called!
  532.  
  533. You are trying to use the old network configuration utilities; the new
  534. ones can be found on tsx-11.mit.edu in
  535. /pub/linux/packages/net/net-2/binaries.
  536.  
  537. Note that they cannot be used just like the old-style programs; see the
  538. NET-2 HOWTO for instructions on how to set up networking correctly.
  539.  
  540. -------------------------------------------------------------------------------
  541.  
  542. Question 7.5.  ld: unrecognized option '-m486'
  543.  
  544. You have an old version of ld.  Install a newer binutils package -- this
  545. will contain an updated ld:
  546.    tsx-11.mit.edu:/pub/linux/packages/GCC/binutils.tar.z
  547.  
  548. -------------------------------------------------------------------------------
  549.  
  550. Question 7.6.  GCC says Internal compiler error
  551.  
  552. If the fault is repeatable (ie, it always happens at the same place in the
  553. same file) you have discovered a bug in GCC.  See the GCC Info
  554. documentation (type Control-h i in Emacs, and select GCC from the menu)
  555. for details on how to report this -- make sure you have the latest version
  556. though.
  557.  
  558. Note that this is probably not a Linux-specific problem; unless you were
  559. compiling a program many other Linux users also compile you should not
  560. post your bug report to any of the comp.os.linux groups.
  561.  
  562. If the problem is not repeatable you are very probably experiencing memory
  563. corruption --- see Q7.7 `make says Error 139'.
  564.  
  565. -------------------------------------------------------------------------------
  566.  
  567. Question 7.7.  make says Error 139
  568.  
  569. Your compiler driver (gcc) dumped core.  You probably have a corrupted,
  570. buggy or old version of GCC --- get the latest release.  Alternatively you
  571. may be running out of swap space --- see Q6.12 `My machine runs very
  572. slowly when I run GCC / X / ...' for more info.
  573.  
  574. If this doesn't fix the problem you are probably having problems with
  575. memory or disk corruption.  Check that the clock rate, wait states and
  576. refresh timing for your SIMMs are correct.  If so you may have some dodgy
  577. SIMMs or a faulty hard disk or controller.
  578.  
  579. Linux, like any Unix, is a very good memory tester --- much better than
  580. DOS-based memory test programs.
  581.  
  582. Reportedly some clone x87 maths coprocessors can cause problems; try
  583. compiling a kernel with maths emulation [Q6.20 `How do I upgrade/recompile
  584. my kernel ?']; you may need to use the no387 kernel command line flag on
  585. the LILO prompt to force the kernel to use it, or it may be able to work
  586. and still use the 387, with the maths emulation compiled in but mainly
  587. unused.
  588.  
  589. -------------------------------------------------------------------------------
  590.  
  591. Question 7.8.  df says Cannot read table of mounted filesystems
  592.  
  593. There is probably something wrong with your /etc/mtab or /etc/fstab files.
  594. If you have a reasonably new version of mount, /etc/mtab should be emptied
  595. or deleted at boot time (in /etc/rc or /etc/rc.local), using something
  596. like
  597.    rm -f /etc/mtab*
  598.  
  599. Some versions of SLS have an entry for the root partition in /etc/mtab
  600. made in /etc/rc by using rdev.  This is incorrect -- the newer versions of
  601. mount do this automatically.
  602.  
  603. Other versions of SLS have a line in /etc/fstab that looks like:
  604.     /dev/sdb1   /root   ext2   defaults
  605. This is wrong.  /root should read simply /.
  606.  
  607. -------------------------------------------------------------------------------
  608.  
  609. Question 7.9.  shell-init: permission denied when I log in.
  610.  
  611. Your root directory and all the directories up to your home directory must
  612. be readable and executable by everybody.  See the manpage for chmod or a
  613. book on Unix for how to fix the problem.
  614.  
  615. -------------------------------------------------------------------------------
  616.  
  617. Question 7.10.  No utmp entry.  You must exec ... when I log in.
  618.  
  619. Your /etc/utmp is screwed up.  You should have
  620.    > /etc/utmp
  621. in your /etc/rc or /etc/rc.local.  See Q6.19 `I have screwed up my system
  622. and can't log in to fix it.' for how to be able to do this.
  623.  
  624. -------------------------------------------------------------------------------
  625.  
  626. Question 7.11.  EXT2-fs: warning: mounting unchecked filesystem
  627.  
  628. You need to run e2fsck (or fsck -t ext2 if you have the fsutils package)
  629. with the -a option to get it to clear the `dirty' flag, and then cleanly
  630. unmount the partition during each shutdown.
  631.  
  632. The easiest way to do this is to get the bootutils package, available on
  633. sunsite and tsx-11.  You have to make sure you have a recent umount
  634. command.
  635.  
  636. NB don't try to check a filesystem that's mounted read-write - this
  637. includes the root partition if you don't see
  638.    VFS: mounted root ... read-only
  639. at boot time.  You must arrange for to initially mount the root filesystem
  640. readonly, check it if necessary, and then remount it read-write.  Read the
  641. documentation that comes with bootutils to find out how to do this.
  642.  
  643. Note that you need to specify the -n option to mount to get it not to try
  644. to update /etc/mtab, since the root filesystem is still read-only and this
  645. will otherwise cause it to fail !
  646.  
  647. -------------------------------------------------------------------------------
  648.  
  649. Question 7.12.  EXT2-fs warning: maximal count reached
  650.  
  651. This message is issued by the kernel when it mounts a filesystem that's
  652. marked as clean, but whose `number of mounts since check' counter has
  653. reached the predifined value.  The solution is to get the latest version
  654. of the ext2fs utilities (e2fsprogs-0.4a.tar.gz at the time of writing)
  655. from the usual sites [Q2.4 `Where can I get Linux material by FTP ?'].
  656.  
  657. The maximal number of mounts value can be examined and changed using the
  658. tune2fs program from this package.
  659.  
  660. -------------------------------------------------------------------------------
  661.  
  662. Question 7.13.  EXT2-fs warning: checktime reached
  663.  
  664. Kernels from 1.0 onwards support checking a filesystem based on the
  665. elapsed time since the last check as well as by the number of mounts.  Get
  666. the latest version of the ext2fs utilities [see Q7.12 `EXT2-fs warning:
  667. maximal count reached'].
  668.  
  669. -------------------------------------------------------------------------------
  670.  
  671. Question 7.14.  fdisk says cannot use nnn sectors of this partition
  672.  
  673. Originally Linux only supported the Minix filesystem, which cannot use
  674. more than 64Mb per parition.  This limitation is not present in the more
  675. advanced filesystems now available, such as ext2fs (the 2nd version of the
  676. Extended Filesystem) and xiafs (Qi Xia's filesystem).
  677.  
  678. If you intend to use ext2fs or xiafs you can ignore the message.
  679.  
  680. -------------------------------------------------------------------------------
  681.  
  682. Question 7.15.  fdisk says partition n has an odd number of sectors
  683.  
  684. The PC disk partitioning scheme works in 512-byte sectors, but Linux uses
  685. 1K blocks.  If you have a partition with an odd number of sectors the last
  686. sector is wasted.  Ignore the message.
  687.  
  688. -------------------------------------------------------------------------------
  689.  
  690. Question 7.16.  mtools says cannot initialise drive XYZ
  691.  
  692. This means that mtools is having trouble accessing the drive.  This can be
  693. due to several things.
  694.  
  695. Often this is due to the permissions on floppy drive devices (/dev/fd0*
  696. and /dev/fd1*) being incorrect --- the user running mtools must have the
  697. appropriate access.  See the manpage for chmod for details.
  698.  
  699. Most versions of mtools distributed with Linux systems (not the standard
  700. GNU version) use the contents of a file /etc/mtools to discover which
  701. devices and densities to use, in place of having this information compiled
  702. into the binary.  Mistakes in this file often cause problems.  There is
  703. often no documentation about this --- distribution packagers please note
  704. that this is *evil*.
  705.  
  706. For the easiest way to access your DOS files (especially those on a hard
  707. disk partition) see Q3.2 `How do I access files on my DOS partition or
  708. floppy ?'.  Note - you should never use mtools to access files on an
  709. msdosfs mounted partition or disk !
  710.  
  711. -------------------------------------------------------------------------------
  712.  
  713. Question 7.17.  My AHA1542C doesn't work with Linux.
  714.  
  715. You need to turn off most of the "advanced BIOS" options - all but the one
  716. about scanning the bus for bootable devices.  The option to allow disks
  717. with more than 1024 cylinders is only required as a workaround for a DOS
  718. misfeature and should be turned *off* under Linux.
  719.  
  720. ===============================================================================
  721.  
  722. Section 8.  The X Window System
  723.  
  724.  Q8.1        Does Linux support X Windows ?
  725.  Q8.2        Where can I get an Xconfig for my video card and monitor ?
  726.  Q8.3        xterm logins show up strangely in who, finger
  727.  Q8.4        I can't get X Windows to work right.
  728.  
  729. -------------------------------------------------------------------------------
  730.  
  731. Question 8.1.  Does Linux support X Windows ?
  732.  
  733. Yes.  Linux uses XFree86 2.0, which is a derivative of X11R5.  You need to
  734. have a video card which is supported by XFree86 2.0.  See the Linux
  735. XFree86 HOWTO for more details.
  736.  
  737. Some of the Linux releases -- MCC, for example -- don't come with X
  738. Windows already included; however you can easily download and install it
  739. from /pub/Linux/X11/Xfree86-2.0 on sunsite.unc.edu and its mirror sites.
  740. Read the XFree86 HOWTO for installation instructions.
  741.  
  742. Other releases -- Slackware, Debian, TAMU and SLS, for example -- come
  743. with X Windows already included
  744.  
  745. -------------------------------------------------------------------------------
  746.  
  747. Question 8.2.  Where can I get an Xconfig for my video card and monitor ?
  748.  
  749. See the Linux XFree86 HOWTO.
  750.  
  751. You'll need to put together your own Xconfig file, because it depends on
  752. the exact combination of video card and monitor you have.  It's not that
  753. hard to do -- read the instructions that came with XFree86-2.0, in
  754. /usr/X386/lib/X11/etc.  The file you probably most need to look at is
  755. README.Config.
  756.  
  757. Please don't post to comp.os.linux.help asking for an Xconfig.
  758.  
  759. -------------------------------------------------------------------------------
  760.  
  761. Question 8.3.  xterm logins show up strangely in who, finger
  762.  
  763. The xterm that comes with XFree86 2.0 and earlier doesn't correctly
  764. understand the format that Linux uses for the /etc/utmp file, where the
  765. system records who is logged in.  It therefore doesn't set all the
  766. information correctly.
  767.  
  768. I do not know whether XFree86 2.1 fixes this problem.
  769.  
  770. -------------------------------------------------------------------------------
  771.  
  772. Question 8.4.  I can't get X Windows to work right.
  773.  
  774. Read the XFree86 HOWTO - note the question and answer section.
  775.  
  776. Try reading to comp.windows.x.i386unix -- specifically read the the FAQ
  777. for that group.
  778.  
  779. Please don't post X Windows or XFree86 related questions to
  780. comp.os.linux.help unless they are Linux-specific.
  781.  
  782. ===============================================================================
  783.  
  784. Section 9.  How to get further assistance
  785.  
  786.  Q9.1        You still haven't answered my question !
  787.  Q9.2        What to put in a posting to comp.os.linux.help
  788.  
  789. -------------------------------------------------------------------------------
  790.  
  791. Question 9.1.  You still haven't answered my question !
  792.  
  793. Please read all of this answer before posting.  I know it's a bit long,
  794. but you may be about to make a fool of yourself in front of 50000 people
  795. and waste hundreds of hours of their time.  Don't you think it's worth it
  796. to spend some of your time reading and following these instructions ?
  797.  
  798. If you think an answer is incomplete or inaccurate, please mail Ian
  799. Jackson at <ijackson@nyx.cs.du.edu>.
  800.  
  801. Read the appropriate Linux Documentation Project books - see Q2.1 `Where
  802. can I get the HOWTOs and other documentation ?'.
  803.  
  804. If you're a Unix newbie read the FAQ for comp.unix.questions, and those
  805. for any of the other comp.unix.* groups that may be relevant.
  806.  
  807. Linux is a Unix clone, so almost everything you read there will apply to
  808. Linux.  Those FAQs can, like all FAQs, be found on rtfm.mit.edu in
  809. /pub/usenet/news.answers (the mail-server@rtfm.mit.edu can send you these
  810. files, for those who don't have FTP access).
  811.  
  812. Check the relevant HOWTO for the subject in question, if there is one, or
  813. an appropriate old-style sub-FAQ document.  Check the FTP sites.
  814.  
  815. Try experimenting --- that's the best way to get to know Unix and Linux.
  816.  
  817. Read the documentation.  Check the manpages (type man man if you don't
  818. know about manpages.  Try man -k <subject> --- it often lists useful and
  819. relevant manpages.
  820.  
  821. Check the Info documentation (type C-h i, i.e. Control H followed by I in
  822. Emacs) --- NB this isn't just for Emacs; for example the GCC documentation
  823. lives here as well.
  824.  
  825. There will also often be a README file with a package giving installation
  826. and/or usage instructions.
  827.  
  828. Make sure that you don't have a corrupted or out-of-date copy of the
  829. program in question.  If possible, download it again and reinstall it ---
  830. perhaps you made a mistake the first time.
  831.  
  832. Read comp.os.linux.announce --- this often contains very important
  833. information for all Linux users.
  834.  
  835. X-Windows questions belong in comp.windows.x.i386unix, not in
  836. comp.os.linux.help.  But read the group first (including the FAQ), before
  837. you post !
  838.  
  839. Only if you have done all of these things and are still stuck should you
  840. post to comp.os.linux.help; alternatively you could send email to
  841. linux-support@sunsite.unc.edu.  Make sure you read the next question, Q9.2
  842. `What to put in a posting to comp.os.linux.help', first.
  843.  
  844. -------------------------------------------------------------------------------
  845.  
  846. Question 9.2.  What to put in a posting to comp.os.linux.help
  847.  
  848. Please read carefully the following advice about how to write your
  849. posting.  Taking heed of it will greatly increase the chances that an
  850. expert and/or fellow user reading your posting will have enough
  851. information and motivation to reply.
  852.  
  853. Make sure you give full details of the problem, including
  854.  
  855. * What program, exactly, you are having problems with.  Include the
  856.   version number if known and say where you got it.  Many standard
  857.   commands tell you their version number if you give them a --version
  858.   option.
  859.  
  860. * Which Linux release you're using (MCC, Slackware, whatever) and what
  861.   version of that release.
  862.  
  863. * The *exact* and *complete* text of any error messages printed.
  864.  
  865. * Exactly what behaviour you were expecting, and exactly what behaviour
  866.   you observed.  A transcript of an example session is a good way of
  867.   showing this.
  868.  
  869. * The contents of any configuration files used by the program in question
  870.   and any related programs.
  871.  
  872. * What version of the kernel and of the shared libraries you are using.
  873.   The kernel version can be found by typing uname -a, and the shared
  874.   library version by typing ls -l /lib/libc.so.4.
  875.  
  876. * Details of what hardware you're running on, if it seems appropriate.
  877.  
  878. You are in little danger of making your posting too long unless you
  879. include large chunks of source code or uuencoded files, so err on the side
  880. of giving too much information.
  881.  
  882. Use a clear, detailed Subject line.  Don't put things like `doesn't work',
  883. `Linux', `help' or `question' in it --- we already knew that ! Save the
  884. space for the name of the program, a fragment of the error message,
  885. summary of the unusual behaviour, etc.
  886.  
  887. If you are reporting an `unable to handle kernel paging request' message,
  888. follow the instructions in the Linux kernel sources README for turning the
  889. numbers into something more meaningful.  If you don't do this noone who
  890. reads your post will be able to do it for you, as the mapping from numbers
  891. to function names varies from one kernel to another.
  892.  
  893. Put a summary paragraph at the top of your posting.
  894.  
  895. At the bottom of your posting, ask for responses by email and say you'll
  896. post a summary.  Back this up by using Followup-To: poster.  Then, do
  897. actually post a summary in a few days or a week or so.  Don't just
  898. concatenate the replies you got --- summarise.  Putting the word SUMMARY
  899. in your summary's Subject line is also a good idea.
  900.  
  901. Make sure your posting doesn't have an inappropriate References header
  902. line.  This marks your article as part of the thread of the article
  903. referred to, which will often cause it to be junked by the readers with
  904. the rest of a boring thread.  If you use (t)rn you must make sure that
  905. when you post you use the lowercase f key; using uppercase F and deleting
  906. the quoted text doesn't do the same thing.  However Some versions of trn
  907. 2.x have a bug which produces this effect effen if you use f.  If this
  908. applies to your version you can edit out the References line in the
  909. message before you post, or just use plain Pnews to make a new posting.
  910. You should always read the header before posting anyway.
  911.  
  912. You might like to say in your posting that you've read this FAQ and the
  913. appropriate HOWTOs - this may make people less likely to skip your
  914. posting.
  915.  
  916. Remember that you should not post email sent to you personally without the
  917. sender's permission.
  918.  
  919. ===============================================================================
  920.  
  921. Section 10.  Administrative information and acknowledgements
  922.  
  923.  Q10.1       Feedback is invited
  924.  Q10.2       Formats in which this FAQ is available
  925.  Q10.3       Authorship and acknowledgements
  926.  Q10.4       Disclaimer and Copyright
  927.  
  928. -------------------------------------------------------------------------------
  929.  
  930. Question 10.1.  Feedback is invited
  931.  
  932. Please send me your comments on this FAQ.
  933.  
  934. I accept submissions for the FAQ in any format;  All contributions
  935. comments and corrections are gratefully received.
  936.  
  937. Please send them to <ijackson@nyx.cs.du.edu>.
  938.  
  939. -------------------------------------------------------------------------------
  940.  
  941. Question 10.2.  Formats in which this FAQ is available
  942.  
  943. This document is available as ASCII text, an Emacs Info document and
  944. PostScript.
  945.  
  946. The ASCII and Emacs Info versions and a Lout typesetter file (from which
  947. the PostScript is produced) are generated automatically by a Perl script
  948. which takes as input a file in the Bizarre Format with No Name.
  949.  
  950. The output files linux-faq.ascii, .info and .ps and a tarfile
  951. linux-faq.source.tar.gz, containing the BFNN source and Perl script
  952. converter, are available in the docs directories of the major Linux FTP
  953. sites.
  954.  
  955. -------------------------------------------------------------------------------
  956.  
  957. Question 10.3.  Authorship and acknowledgements
  958.  
  959. This FAQ was compiled by Ian Jackson <ijackson@nyx.cs.du.edu>, with
  960. assistance and comments from others too numerous to mention.  It was
  961. loosely based on the original Linux FAQ by Marc-Michel Corsini.
  962.  
  963. Special thanks are due to Matt Welsh, who coordinates the HOWTOs and has
  964. written substantial portions of many of them, and to Marc-Michel Corsini.
  965. Thanks also to the contributors to the previous Linux FAQ, and to those
  966. sent me comments about this FAQ, and who answered questions on the
  967. newsgroup.
  968.  
  969. Last but not least, thanks to Linus Torvalds and the other contributors to
  970. Linux for giving us something to write about !
  971.  
  972. -------------------------------------------------------------------------------
  973.  
  974. Question 10.4.  Disclaimer and Copyright
  975.  
  976. Note that this document is provided as is.  The information in it is *not*
  977. warranted to be correct; you use it at your own risk.
  978.  
  979. Following recent reports on the faq-maintainers list I think it wise to
  980. change the copyright again:
  981.  
  982. Linux Frequently Asked Questions with Answers is Copyright 1994 by Ian
  983. Jackson <ijackson@nyx.cs.du.edu>.  It may be reproduced and distributed in
  984. whole or in part, subject to the following conditions:
  985.  
  986. * This copyright and permission notice and the paragraph in the
  987.   introduction about the frequency of updates must be retained on all
  988.   complete or partial copies.
  989.  
  990. * Any translation or derivative work must be approved by me before
  991.   distribution.  Email me - I'll probably be happy to oblige !
  992.  
  993. * If you wish to charge for non-machine-readable copies you need my
  994.   approval before distribution.  Note that this restriction is not
  995.   intended to prohibit charging for the service of printing or copying a
  996.   document supplied by your customer.
  997.  
  998. * If you distribute Linux Frequently Asked Questions with Answers in part,
  999.   instructions for obtaining the complete version must be included, and a
  1000.   means for obtaining a complete version free or at cost price provided.
  1001.  
  1002. Exceptions to these rules may be granted, and I shall be happy to answer
  1003. any questions about this copyright --- write to Ian Jackson, Churchill
  1004. College, Cambridge, CB3 0DS, United Kingdom or email
  1005. ijackson@nyx.cs.du.edu.  These restrictions are here to protect the
  1006. contributors, not to restrict you as educators and learners.
  1007.  
  1008. ===============================================================================
  1009. -- 
  1010. Ian Jackson, at home  <ijackson@nyx.cs.du.edu> or <iwj10@cus.cam.ac.uk>
  1011. PGP2 public key available on server.  Urgent email: <iwj10@phx.cam.ac.uk>
  1012. 2 Lexington Close, Cambridge, CB4 3LS, England;  phone: +44 223 64238
  1013.  
  1014.